<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <template id="sub-component">
        <section>
            <h1 v-if="level === 1">
                <slot></slot>
            </h1>
            <h2 v-else-if="level === 2">
                <slot></slot>
            </h2>
            <h3 v-else-if="level === 3">
                <slot></slot>
            </h3>
            <h4 v-else-if="level === 4">
                <slot></slot>
            </h4>
            <h5 v-else-if="level === 5">
                <slot></slot>
            </h5>
            <h6 v-else-if="level === 6">
                <slot></slot>
            </h6>
        </section>
    </template>
</body>
<script src="../vue.js"></script>
<script>
    Vue.component("sub-component", {
        props: {
            level: {
                type: Number,
                default: 1
            }
        }
    })
</script>

</html>